// message: 'Upload Complete',
// position: 'bottom',
// duration: 5000
import { showToast, hideToast, isStr } from '../shared'

export function Toast(options) {
  if (isStr(options)) {
    options = {
      title: options,
    }
  } else {
    options.title = options.message
  }
  showToast(options)
  return {
    close: hideToast,
  }
}

export default Toast
